<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateTaskCommentsTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('task_comments', function(Blueprint $table)
		{
			$table->increments('id');
			$table->text('comment');
			$table->timestamp('insert_time')->default(DB::raw('CURRENT_TIMESTAMP'));
			$table->dateTime('last_update')->default('0000-00-00 00:00:00');
			$table->integer('is_from_email')->default(0);
			$table->integer('comment_by');
			$table->string('commnet_user_name');
			$table->integer('task')->index('idx_task_comments_task');
			$table->integer('valid')->default(1);
			$table->integer('isMergeData')->default(0);
			$table->integer('email_id')->nullable();
			$table->timestamps();
			$table->softDeletes();
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('task_comments');
	}

}
